package com.sina.medical.controller;

import com.sina.medical.domain.user.User;
import com.sina.medical.service.user.UserService;
import com.sina.medical.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * 段浩杰   2017-10-24-19:37
 */
@Controller
@RequestMapping("home")
public class HomeController extends BaseController {

    @Autowired
    @Qualifier("userService")
    private UserService userService;

    @RequestMapping("view")
    @ResponseBody
    public String test() {
        return "123";
    }

    @RequestMapping("user")
    @ResponseBody
    public User getUser() {
        return userService.getUserById(1);
    }


}
